package user;

import operation.*;

import java.util.Scanner;

/**
 * Created with IDEA
 * author:ju bai
 * Date:2021/1/18
 * Time:19:29
 **/
public class AdminUser extends User{
    public AdminUser(String name) {
        super(name);
        this.operations = new IOperation[]{
                new ExitOperation(),//0
                new FindOperation(),
                new AddOperation(),
                new DelOperation(),
                new DisOperation()
        };
    }

    @Override
    public int menu() {
        Scanner scanner = new Scanner(System.in);
        System.out.println("=================");
        System.out.println("Hello " + this.name + ", 欢迎使用图书管理系统!");
        System.out.println("1. 查找图书");
        System.out.println("2. 新增图书");
        System.out.println("3. 删除图书");
        System.out.println("4. 显示所有图书");
        System.out.println("0. 退出系统");
        System.out.println("=================");
        System.out.println("请输入选择的数字：");
        int choice = scanner.nextInt();
        return choice;
    }
}
